<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //1、访问对象中不存在的成员
        var obj={};
        console.log(obj.name);  //undefined

        //2、变量未赋值
        console.log(i);  //undefined
        var i;

        //3、函数的参数没有赋值
        function foo(p1){
            console.log(p1);
        }
        foo();  //undefined

        //4、函数没有返回值
        var result=foo();
        console.log(result);  //undefined
    </script>
</body>
</html>